<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    #box{
      width: 400px;
      height: 400px;
      /* 
      linear-gradient(颜色，颜色，颜色，颜色) 线性渐变  */

      /* background: linear-gradient(green,black,red); */
      /* to right 从左到右 
        to left 从右到左 */
      background: linear-gradient(to left,green,yellow,blue);
      
    }
    #move{
      width: 600px;
      height:600px;
      /* 径向渐变 */
      background: radial-gradient(green,yellow,red);
    }
    
  </style>
</head>
<body>
    <div id="box">

    </div>
    <div id="move"></div>
</body>
</html>
<!-- 
    
  
 -->